package com.example.goodpet.utils;

import android.content.res.AssetManager;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

//配置各个页面联网地址
public class Constants {
    public static String BASE_URL;

    static {
        AssetManager assetManager = MyApplication.context.getAssets();
        Properties pro=new Properties();
        try {
            InputStream is = assetManager.open("server.properties");
            pro.load(is);
            String server = pro.getProperty("server");
            System.out.println(server);
            BASE_URL=server;
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

//
    /**
     * 主页面的路径
     */
    public static final String JSON_URL = BASE_URL + "file/json/";
    public static final String BASE_URL_IMAGE = BASE_URL + "file/image";
    public static final String BASE_URL_support = BASE_URL + "file/support";


    public static final String MAIN_CHANNEL_DOG_JSON ="MAIN_CHANNEL_DOG_URL.json";
    public static final String MAIN_CHANNEL_CAT_JSON ="MAIN_CHANNEL_CAT_URL.json";
    public static final String MAIN_CHANNEL_PET_JSON ="MAIN_CHANNEL_PET_URL.json";
    public static final String HOME_JSON ="HOME_URL.json";
    public static final String TAOBAO_URL ="TAOBAO_URL.json";
    public static final String TIPS_URL ="TIPS_URL.json";
    public static final String UPDATE_URL ="updateInfo.json";


    public static final String SELECT_USER_BY_PET_ID ="selectUserByPetId";
    public static final String SELECT_IMAGE_BY_PET_ID ="selectImageByPetId";
//    public static final String SELECT_ALL_PET_INFO ="selectAllPetInfo";

    public static final String SELECT_ALL_USER_PET_INFO ="selectAllUserPetInfo";
//    public static final String SELECT_SPECIFIC_PET_INFO ="selectSpecificPetInfo";

    public static final String SELECT_SPECIFIC_USER_PET_INFO ="selectSpecificUserPetInfo";

    public static final String SELECT_MAIN_CHANNEL_USER_PET_INFO ="selectMainChannelServlet";

    public static final String SELECT_USER_PET_INFO_BY_SEARCH ="selectUserPetInfoBySearch";
    public static final String SELECT_USER_BY_SEARCH ="selectUserBySearch";
    public static final String SELECT_TIEZI_BY_SEARCH ="selectTieziBySearch";


    public static final String SELECT_ALL_USER_TIEZI_INFO ="selectAllUserTieziInfo";
//    public static final String SELECT_IMAGE_BY_TIEZI_ID ="selectImageByTieziId";

//    public static final String TIEZI_IS_LIKE ="tieziIsLike";
//    public static final String TIEZI_IS_COLLECT ="tieziIsCollect";
    public static final String UPDATE_USER_LIKE ="updateUserLike";
    public static final String UPDATE_USER_TIEZI_COLLECT ="updateUserTieziCollect";


    public static final String SELECT_GOODPET_COMMENT ="selectGoodPetComment";
    public static final String SELECT_GOODPET_COMMENT_SECOND ="selectGoodPetCommentSecond";
    public static final String SELECT_GOODPET_COMMENT_COUNT ="selectGoodPetCommentCount";

    public static final String INSERT_GOODPET_COMMENT_SECOND ="insertGoodpetCommentSecond";
    public static final String INSERT_GOODPET_COMMENT ="insertGoodpetComment";
    public static final String GOODPET_COMMENT_LIKE ="goodpetCommentLike";
    public static final String GOODPET_COMMENT_LIKE_SECOND ="goodpetCommentLikeSecond";


    public static final String SELECT_TIEZI_COMMENT ="selectTieziComment";
    public static final String SELECT_TIEZI_COMMENT_SECOND ="selectTieziCommentSecond";
    public static final String SELECT_TIEZI_COMMENT_COUNT ="selectTieziCommentCount";

    public static final String INSERT_TIEZI_COMMENT_SECOND ="insertTieziCommentSecond";
    public static final String INSERT_TIEZI_COMMENT ="insertTieziComment";
    public static final String TIEZI_COMMENT_LIKE ="tieziCommentLike";
    public static final String TIEZI_COMMENT_LIKE_SECOND ="tieziCommentLikeSecond";




}
